/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package index.inverted;

/**
 *
 * @author Danang
 */
public class PositionAndBytes {

    long pos;
    int bytes;

    public PositionAndBytes(String str) {
        String[] tmp = str.split(":");
        pos = Long.parseLong(tmp[0]);
        bytes = Integer.parseInt(tmp[1]);
    }

    public long getPosition() {
        return pos;
    }

    public int getBytesNumber() {
        return bytes;
    }

    public boolean isPostingListEmpty() {
        return bytes == 0;
    }
    
    public String toString() {
        return ""+pos+":"+bytes;
    }
}

